﻿/*
Bf3Rcon.NET, provides a .NET implementation of BF3's RCON interface.
Copyright (C) 2011 Timi

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

You can contact us at http://bf3rcon.codeplex.com/.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Net.Battlefield3
{
    /// <summary>
    /// This <see cref="PlayerSubset"/> refers to all players in the server.
    /// </summary>
    /// <remarks>
    /// <see cref="PlayerSubset">PlayerSubsets</see> are used to select a specific group of players by team, squad, 
    /// name, or all players.<para /> <para />
    /// <see cref="PlayerSubset">PlayerSubsets</see>, in the RCON protocol, are used to select groups of players in places like
    /// admin.listPlayers and admin.say. Both of these commands are wrapped by the library, so
    /// using them isn't needed.
    /// </remarks>
    /// <example>
    /// You can use a <see cref="PlayerSubset"/> to send a message to specific <see cref="Player">Players</see>.<para />
    /// Note that <see cref="RconClientBase"/> contains methods that don't require <see cref="PlayerSubset">PlayerSubsets</see>.
    /// <code language="VB.NET">
    /// <![CDATA[
    /// 'Send a message to all players.
    /// Public Sub SendMessage(client As RconClient, message As String)
    ///     client.SendMessage(message, New AllPlayerSubset())
    /// End Sub
    /// ]]>
    /// </code>
    /// <code language="C#">
    /// <![CDATA[
    /// //Send a message to all players.
    /// void SendMessage(RconClient client, string message)
    /// {
    ///     client.SendMessage(message, new AllPlayerSubset());
    /// }
    /// ]]>
    /// </code>
    /// </example>
    [Serializable]
    public sealed class AllPlayerSubset : PlayerSubset
    {
        /// <summary>
        /// Creates a new <see cref="AllPlayerSubset"/>.
        /// </summary>
        public AllPlayerSubset()
        {
            Values = new string[] { "" };
            Name = "all";
        }
    }
}
